import Request from '@/libs/request'

/**web 单设备水质数据 --单参数指标详细  --图表 */
export const uSelectSingleParamDataStatistic = (data: {
  devId: string | number
  paramName: string
  startTime: string
  endTime: string,
  paramstatus: string
}) => Request.get<SingleParam.WaterOverview>('/user/uSelectSingleParamDataStatistic', data)

/**web 单设备水质数据 --单参数指标详细  --异常分布 */
export const uSelectSingleParamExceptionDistribution = (data: {
  devId: string | number
  paramName: string
}) =>
  Request.get<SingleParam.AbnormalDivision>('/user/uSelectSingleParamExceptionDistribution', data)

/**web 单设备水质数据 --单参数指标详细  --单参历史记录 */
export const uSelectCheckDataByQueryVo = (
  data: {
    devId: string | number
    paramName: string
    startTime?: string
    endTime?: string
    paramStatus?: string
  } & Omit<Paging, 'start'>
) => Request.get<PagingResponse<SingleParam.CheckData>>('/user/uSelectCheckDataByQueryVo', data)

/**导出单参数历史检测数据 */
export const exportCheckData = (data: { devId: number; startTime: string; endTime: string }) =>
  Request.filePost('/exc/exportCheckData', data)
